/* global Vue */
const { createApp } = Vue;
createApp({
  data() {
    return {
      msg: '',
      todoList: [
        {
          key: 1,
          value: '吃饭',
        },
        {
          key: 2,
          value: '睡觉',
        },
      ],
      doneList: [
        {
          key: 3,
          value: '打豆豆',
        },
      ],
    };
  },
  methods: {
    submit() {
      this.todoList.push({
        key: Date.now(),
        value: this.msg,
      });
      this.msg = '';
    },
  },
}).mount('#app');
